package base
{
	import api.dataStruct.GameApiInfo;
	import api.dataStruct.GameInfo;
	import api.dataStruct.InitAPIObj;
	
	import com.game.api.APICore;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.Stage;
	
	import main.InitAPI;

	public class GlobalData
	{
		public static var gameId:uint=20420;
		public static var gameName:String="测试游戏";
		public static var actorList:Array=["actor1","actor2"];
		public static var totalPlayer:uint=2;
		public static var gameW:int=850;
		public static var gameH:int=510;
		public static var frameRate:uint=24;
		public static var myInfo:GameApiInfo;
		public static var userInfo:GameApiInfo;
		public static var apiType:uint=InitAPIObj.TYPE_2;
		
		public static var isHttp:Boolean=false;

		
		public static var apiCore:APICore=APICore.getInstance();	
		
		public static var isRobot:Boolean=false; 		
		
		public function GlobalData()
		{
		}
		
		public static function getInitAPIObj():InitAPIObj{
			
			return new InitAPIObj(apiType,new GameInfo(gameId,gameName,totalPlayer,gameW,gameH,actorList),true);
			
		}
		
		public static function setCenter(disObj:DisplayObjectContainer):void{
			disObj.x=(gameW-disObj.width)/2;
			disObj.y=(gameH-disObj.height)/2;
		}
	}
}